<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;

class CreateYsBarfansTable extends Migration {

	/**
	 * Run the migrations.
	 *
	 * @return void
	 */
	public function up()
	{
		Schema::create('barfans', function(Blueprint $table)
		{
			$table->increments('id')->comment('主键id');
			$table->string('bar_num', 32)->index('barfans_bar_num_index')->comment('关联吧id');
			$table->bigInteger('uid')->comment('关注吧的用户');
			$table->boolean('status')->nullable()->default(0)->comment('状态0为关注,1取消关注');
			$table->boolean('grade')->nullable()->default(0)->comment('在本吧等级');
			$table->integer('exp')->nullable()->default(0)->comment('在本吧经验值');
			$table->timestamps();
		});
	}


	/**
	 * Reverse the migrations.
	 *
	 * @return void
	 */
	public function down()
	{
		Schema::drop('barfans');
	}

}
